diff --git a/pogom/models.py b/pogom/models.py index 988fb79ded..2d6fbbc2f9 100644 --- a/pogom/models.py +++ b/pogom/models.py @@ -1100,6 +1100,7 @@ class WorkerStatus(LatLongModel): fail = IntegerField() no_items = IntegerField() skip = IntegerField() + missed = IntegerField() captcha = IntegerField() last_modified = DateTimeField(index=True) message = Utf8mb4CharField(max_length=191) @@ -1116,6 +1117,7 @@ def db_format(status, name='status_worker_db'): 'fail': status['fail'], 'no_items': status['noitems'], 'skip': status['skip'], + 'missed': status['missed'], 'captcha': status['captcha'], 'last_modified': datetime.utcnow(), 'message': status['message'], @@ -2293,6 +2295,7 @@ def parse_map(args, map_dict, step_location, db_update_queue, wh_update_queue, if clock_between(endpoints[0], now_secs, endpoints[1]): sp['missed_count'] += 1 spawn_points[sp['id']] = sp + status['missed'] += 1 log.warning('%s kind spawnpoint %s has no Pokemon %d times' ' in a row.', sp['kind'], sp['id'], sp['missed_count']) @@ -3066,7 +3069,9 @@ def database_migrate(db, old_ver): DateTimeField( null=False, default=datetime.utcnow())), migrator.add_column('gym', 'total_cp', - SmallIntegerField(null=False, default=0))) + SmallIntegerField(null=False, default=0)), + migrator.add_column('workerstatus', 'missed', + IntegerField(null=True))) # Always log that we're done. log.info('Schema upgrade complete.') diff --git a/pogom/search.py b/pogom/search.py index 9139ac5073..94d092bb8d 100644 --- a/pogom/search.py +++ b/pogom/search.py @@ -173,14 +173,15 @@ def status_printer(threadStatus, account_failures, logmode, hash_key, str(threadStatus[item]['proxy_display']))) # How pretty. - status = '{:10} | {:5} | {:' + str(userlen) + '} | {:' + str( - proxylen) + '} | {:7} | {:6} | {:5} | {:7} | {:8} | {:10}' + status = ('{:10} | {:5} | {:' + str(userlen) + '} | {:' + str( + proxylen) + '} | {:7} | {:6} | {:5} | {:7} | {:6} | {:8} ' + + '| {:10}') # Print the worker status. status_text.append(status.format('Worker ID', 'Start', 'User', 'Proxy', 'Success', 'Failed', - 'Empty', 'Skipped', 'Captchas', - 'Message')) + 'Empty', 'Skipped', 'Missed', + 'Captchas', 'Message')) for item in sorted(threadStatus): if(threadStatus[item]['type'] == 'Worker'): current_line += 1 @@ -202,6 +203,7 @@ def status_printer(threadStatus, account_failures, logmode, hash_key, threadStatus[item]['fail'], threadStatus[item]['noitems'], threadStatus[item]['skip'], + threadStatus[item]['missed'], threadStatus[item]['captcha'], threadStatus[item]['message'])) @@ -451,6 +453,7 @@ def search_overseer_thread(args, new_location_queue, control_flags, heartb, 'fail': 0, 'noitems': 0, 'skip': 0, + 'missed': 0, 'captcha': 0, 'username': '', 'proxy_display': proxy_display, @@ -811,6 +814,8 @@ def search_worker_thread(args, account_queue, account_sets, account_failures, 0, 'skip': 0, + 'missed': + 0, 'captcha': 0, 'active': diff --git a/static/js/status.js b/static/js/status.js index f8bbbc4f8b..09e620c9b3 100644 --- a/static/js/status.js +++ b/static/js/status.js @@ -52,6 +52,7 @@ function addWorker(mainWorkerHash, workerHash) {
+
@@ -101,6 +102,7 @@ function processWorker(i, worker) { $('#fail_' + hash).html(worker['fail']) $('#no_items_' + hash).html(worker['no_items']) $('#skip_' + hash).html(worker['skip']) + $('#missed_' + hash).html(worker['missed']) $('#captchas_' + hash).html(worker['captcha']) $('#lastmod_' + hash).html(lastModified) $('#message_' + hash).html(worker['message']) @@ -237,6 +239,9 @@ function addTable(hash) {
Skipped
+
+ Missed +
Captchas