1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 08:38:59 +00:00

fixed a silly

This commit is contained in:
Lynne Megido 2020-01-20 12:56:24 +10:00
parent 898f2f7aae
commit 170a666496
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90
2 changed files with 3 additions and 2 deletions

View file

@ -122,7 +122,7 @@ def generate_output(handle):
# also format handles without instances, e.g. @user instead of @user@instan.ce
post = re.sub(r"(?<!\S)@(\w+)", r"@{}\1".format(zws), post)
return post
return bot, post
def make_post(args):
@ -133,7 +133,7 @@ def make_post(args):
acct = args[3]
handle = args[0]
post = generate_output(handle)
bot, post = generate_output(handle)
# print(post)
visibility = bot['post_privacy'] if len(args) == 1 else args[2]

View file

@ -48,6 +48,7 @@ db.commit()
print("Generating posts")
cursor.execute("SELECT handle FROM bots WHERE enabled = TRUE AND TIMESTAMPDIFF(MINUTE, last_post, CURRENT_TIMESTAMP()) >= post_frequency")
# cursor.execute("SELECT handle FROM bots WHERE enabled = TRUE")
bots = cursor.fetchall()
with Pool(cfg['service_threads']) as p: