You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# It might now be possible to send msgs which were previously marked as toodifficult.
2369
+
# Let us change them to 'msgqueued'. The singleWorker will try to send them and will again
2370
+
# mark them as toodifficult if the receiver's required difficulty is still higher than
2371
+
# we are willing to do.
2372
+
sqlExecute('''UPDATE sent SET status='msgqueued' WHERE status='toodifficult' ''')
2373
+
shared.workerQueue.put(('sendmessage', ''))
2374
+
2356
2375
#start:UI setting to stop trying to send messages after X days/months
2357
2376
# I'm open to changing this UI to something else if someone has a better idea.
2358
2377
if ((self.settingsDialogInstance.ui.lineEditDays.text()=='') and (self.settingsDialogInstance.ui.lineEditMonths.text()=='')):#We need to handle this special case. Bitmessage has its default behavior. The input is blank/blank
Copy file name to clipboardExpand all lines: src/class_singleWorker.py
+3-8Lines changed: 3 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -515,14 +515,9 @@ def sendBroadcast(self):
515
515
defsendMsg(self):
516
516
whileTrue: # while we have a msg that needs some work
517
517
518
-
# Select just one msg that needs work. We'll get a msg
519
-
# which is ready to be sent or a msg which we have sent in
520
-
# the last 28 days which were previously marked
521
-
# as 'toodifficult'. If the user has raised the maximum acceptable
522
-
# difficulty then those msgs may now be sendable.
518
+
# Select just one msg that needs work.
523
519
queryreturn=sqlQuery(
524
-
'''SELECT toaddress, toripe, fromaddress, subject, message, ackdata, status FROM sent WHERE (status='msgqueued' or status='doingmsgpow' or status='forcepow' or (status='toodifficult' and lastactiontime>?)) and folder='sent' LIMIT 1''',
525
-
int(time.time()) -2419200)
520
+
'''SELECT toaddress, toripe, fromaddress, subject, message, ackdata, status FROM sent WHERE (status='msgqueued' or status='doingmsgpow' or status='forcepow') and folder='sent' LIMIT 1''')
526
521
iflen(queryreturn) ==0: # if there is no work to do then
527
522
break# break out of this sendMsg loop and
528
523
# wait for something to get put in the shared.workerQueue.
@@ -717,7 +712,7 @@ def sendMsg(self):
717
712
sqlExecute(
718
713
'''UPDATE sent SET status='toodifficult' WHERE ackdata=? ''',
719
714
ackdata)
720
-
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (ackdata, tr.translateText("MainWindow", "Problem: The work demanded by the recipient (%1 and %2) is more difficult than you are willing to do.").arg(str(float(requiredAverageProofOfWorkNonceTrialsPerByte) /shared.networkDefaultProofOfWorkNonceTrialsPerByte)).arg(str(float(
715
+
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (ackdata, tr.translateText("MainWindow", "Problem: The work demanded by the recipient (%1 and %2) is more difficult than you are willing to do. %3").arg(str(float(requiredAverageProofOfWorkNonceTrialsPerByte) /shared.networkDefaultProofOfWorkNonceTrialsPerByte)).arg(str(float(
0 commit comments