From 6d5669c0097f9345d8b0267613bbdef7e1fe514a Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 5 May 2022 19:53:14 +0000 Subject: [PATCH] fix --- bin/server.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/server.dart b/bin/server.dart index 77bfbe9..52bfd59 100644 --- a/bin/server.dart +++ b/bin/server.dart @@ -99,14 +99,15 @@ void main(List args) async { await _importPosts('/data/posts.txt'); // Post a random post - // await _postRandomPost(); + await _postRandomPost(); // Post a random post at random time // Random time is between 1 and 8 hours // Random time is choosen after every post - // while (true) { - // await Future.delayed(Duration(hours: Random().nextInt(8) + 1)); - // await _postRandomPost(); - // } + while (true) { + await Future.delayed(Duration(hours: Random().nextInt(8) + 1)); + await _importPosts('/data/posts.txt'); + await _postRandomPost(); + } }