Skip to content

Commit f9d5860

Browse files
committed
- Code cleanup
1 parent 1880a2f commit f9d5860

File tree

5 files changed

+22
-14
lines changed

5 files changed

+22
-14
lines changed

app/main/model/pathfinder/cronmodel.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ protected function logState(){
157157
$this->lastExecMemPeak = null;
158158
}
159159

160+
/**
161+
* @param bool $addLastIfFinished
162+
* @return array
163+
*/
160164
protected function getHistory(bool $addLastIfFinished = false) : array {
161165
$history = $this->history ? : [];
162166

@@ -214,6 +218,10 @@ protected function inExec() : bool {
214218
return $this->lastExecStart && !$this->lastExecEnd;
215219
}
216220

221+
/**
222+
* @return bool
223+
* @throws \Exception
224+
*/
217225
protected function isTimedOut() : bool {
218226
$timedOut = false;
219227
if($this->lastExecStart){

js/app/lib/cron.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ define([
88
Example1 run task every second ------------------------------------------------------------------------------------
99
let task1 = Cron.new('task1', {precision: 'seconds', interval: 1, timeout: 100});
1010
task1.task = (timer) => {
11-
console.log('task1 function():', timer.getTotalTimeValues());
11+
console.info('task1 function():', timer.getTotalTimeValues());
1212
return 'OK';
1313
};
1414
Cron.set(task1);
1515
1616
Example2 run task every 3 seconds ---------------------------------------------------------------------------------
1717
let task1 = Cron.new('task1', {precision: 'seconds', interval: 3, timeout: 100});
1818
task1.task = (timer) => {
19-
console.log('task1 function():', timer.getTotalTimeValues());
19+
console.info('task1 function():', timer.getTotalTimeValues());
2020
return 'OK';
2121
};
2222
Cron.set(task1);
@@ -25,12 +25,12 @@ define([
2525
let task1 = Cron.new('task1', {precision: 'seconds', interval: 1, timeout: 100});
2626
task1.task = (timer, task) => {
2727
return new Promise((resolve, reject) => {
28-
console.log('task1 Promise1():', timer.getTotalTimeValues(), task.get('interval'));
28+
console.info('task1 Promise1():', timer.getTotalTimeValues(), task.get('interval'));
2929
//task.set('interval', task.get('interval') + 1) // increase run interval every time by 1s
3030
resolve('OK1');
3131
}).then(payload => {
3232
return new Promise((resolve, reject) => {
33-
console.log('task2 Promise2():', timer.getTotalTimeValues(), payload);
33+
console.info('task2 Promise2():', timer.getTotalTimeValues(), payload);
3434
resolve('OK2');
3535
});
3636
});

public/js/v1.5.5/app/lib/cron.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ define([
88
Example1 run task every second ------------------------------------------------------------------------------------
99
let task1 = Cron.new('task1', {precision: 'seconds', interval: 1, timeout: 100});
1010
task1.task = (timer) => {
11-
console.log('task1 function():', timer.getTotalTimeValues());
11+
console.info('task1 function():', timer.getTotalTimeValues());
1212
return 'OK';
1313
};
1414
Cron.set(task1);
1515
1616
Example2 run task every 3 seconds ---------------------------------------------------------------------------------
1717
let task1 = Cron.new('task1', {precision: 'seconds', interval: 3, timeout: 100});
1818
task1.task = (timer) => {
19-
console.log('task1 function():', timer.getTotalTimeValues());
19+
console.info('task1 function():', timer.getTotalTimeValues());
2020
return 'OK';
2121
};
2222
Cron.set(task1);
@@ -25,12 +25,12 @@ define([
2525
let task1 = Cron.new('task1', {precision: 'seconds', interval: 1, timeout: 100});
2626
task1.task = (timer, task) => {
2727
return new Promise((resolve, reject) => {
28-
console.log('task1 Promise1():', timer.getTotalTimeValues(), task.get('interval'));
28+
console.info('task1 Promise1():', timer.getTotalTimeValues(), task.get('interval'));
2929
//task.set('interval', task.get('interval') + 1) // increase run interval every time by 1s
3030
resolve('OK1');
3131
}).then(payload => {
3232
return new Promise((resolve, reject) => {
33-
console.log('task2 Promise2():', timer.getTotalTimeValues(), payload);
33+
console.info('task2 Promise2():', timer.getTotalTimeValues(), payload);
3434
resolve('OK2');
3535
});
3636
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<div id="{{id}}" class="alert alert-warning">
22
<div class="ui-pnotify-icon"><span class="fas fa-exclamation fa-fw fa-lg"></span></div>
3-
<h4 class="ui-pnotify-title">Scheduled maintenance: Update v1.5.3 <i class="fas fa-long-arrow-alt-right"></i> v1.5.4; Shutdown: ~16:00 (UTC). ETA ~17:00 (UTC)</h4>
3+
<h4 class="ui-pnotify-title">Scheduled maintenance: Update v1.5.4 <i class="fas fa-long-arrow-alt-right"></i> v1.5.5; Shutdown: ~16:00 (UTC). ETA ~17:00 (UTC)</h4>
44
</div>

public/templates/ui/notice.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ <h3 class="panel-title">New release {{version}}</h3>
88

99
<div class="price-features text-left" style="min-height: inherit;">
1010
<div class="row">
11-
<div class="col-sm-6">
11+
<div class="col-sm-5">
1212
<ul class="list-unstyled text-left">
13-
<li><i class="fas fa-fw fa-angle-right"></i>Data for NPC stations added <a target="_blank" href="//github.com/exodus4d/pathfinder/issues/858" rel="noopener">#858</a></li>
14-
<li><i class="fas fa-fw fa-angle-right"></i>"Sovereignty" and "Faction warfare" data added <a target="_blank" href="//github.com/exodus4d/pathfinder/issues/853" rel="noopener">#853</a></li>
13+
<li><i class="fas fa-fw fa-angle-right"></i>Bulk update for "Structures" <a target="_blank" href="//github.com/exodus4d/pathfinder/issues/869" rel="noopener">#869</a></li>
14+
<li><i class="fas fa-fw fa-angle-right"></i>Switched to new image server <a target="_blank" href="//github.com/exodus4d/pathfinder/issues/872" rel="noopener">#872</a></li>
1515
</ul>
1616
</div>
17-
<div class="col-sm-6">
17+
<div class="col-sm-7">
1818
<ul class="list-unstyled text-left">
19-
<li><i class="fas fa-fw fa-angle-right"></i>New preview for "signature table" updates <a target="_blank" href="//github.com/exodus4d/pathfinder/issues/803" rel="noopener">#803</a></li>
19+
<li><i class="fas fa-fw fa-angle-right"></i>Improved signature types for "Shattered wormholes" <a target="_blank" href="//github.com/exodus4d/pathfinder/issues/875" rel="noopener">#875</a></li>
2020
<li><i class="fas fa-fw fa-angle-double-right"></i>Many more improvements/fixes. Complete <a href="javascript:void(0)" class="pf-navbar-version-info">changelog</a></li>
2121
</ul>
2222
</div>

0 commit comments

Comments
 (0)