Add job for pulling popular videos

This commit is contained in:
Omar Roth
2018-11-08 20:08:03 -06:00
parent 26eb59e00d
commit 3c98601f35
3 changed files with 24 additions and 1 deletions

View File

@@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
require "crypto/bcrypt/password"
require "detect_language"
require "digest/md5"
require "kemal"
@@ -112,6 +111,13 @@ spawn do
end
end
popular_videos = [] of ChannelVideo
spawn do
pull_popular_videos(PG_DB) do |videos|
popular_videos = videos
end
end
decrypt_function = [] of {name: String, value: Int32}
spawn do
update_decrypt_function do |function|