Skip to content

Commit 01e7ab0

Browse files
authored
Merge pull request #164 from smartin015/cleanup_logs
Remove print/console debugging lines
2 parents cabb56e + 5269bf1 commit 01e7ab0

7 files changed

+1
-16
lines changed

continuousprint/api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,6 @@ def mv_job(self):
219219
new_id = dq.import_job_from_view(sq.get_job_view(src_id))
220220
except ValidationError as e:
221221
return json.dumps(dict(error=str(e)))
222-
223-
print("Imported job from view")
224222
sq.remove_jobs([src_id])
225223
src_id = new_id
226224

continuousprint/static/js/continuousprint_job.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ function CPJob(obj, peers, api, profile, materials) {
228228
for (let i = 0; i < len.length; i++) {
229229
mass += linmasses[i] * len[i];
230230
}
231+
231232
if (!isNaN(mass)) {
232233
r[2].remaining += rem * mass;
233234
r[2].total += tot * mass;

continuousprint/static/js/continuousprint_set.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ function data(count=3) {
1515
function api() {
1616
return {
1717
update: (_, data, cb) => {
18-
console.log(data.material);
1918
cb({...data, id: 1, remaining: (data.count || 1), job_remaining: 2, materials: ((data.materials) ? data.materials.split(',') : [])})
2019
},
2120
};

continuousprint/static/js/continuousprint_settings.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ function CPSettingsViewModel(parameters, profiles=CP_PRINTER_PROFILES, default_s
332332

333333
let events = []
334334
for (let k of custom_events) {
335-
console.log(k);
336335
let actions = [];
337336
for (let a of result.events[k.event] || []) {
338337
actions.push({
@@ -346,7 +345,6 @@ function CPSettingsViewModel(parameters, profiles=CP_PRINTER_PROFILES, default_s
346345
});
347346
}
348347
events.sort((a, b) => a.display < b.display);
349-
console.log("Events", events);
350348
self.events(events);
351349
self.scripts_fingerprint = JSON.stringify(result);
352350
});

continuousprint/static/js/continuousprint_settings.test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ test('invalid model change is ignored', () => {
124124
test('load queues and scripts on settings view shown', () => {
125125
m = mocks();
126126
m[2].get = function (typ, cb) {
127-
console.log(typ);
128127
if (typ === m[2].QUEUES) {
129128
cb([
130129
{name: "archive"},
@@ -146,7 +145,6 @@ test('load queues and scripts on settings view shown', () => {
146145
test('dirty exit commits queues', () => {
147146
let m = mocks();
148147
m[2].get = function (typ, cb) {
149-
console.log(typ);
150148
if (typ === m[2].QUEUES) {
151149
cb([]);
152150
} else if (typ === m[2].AUTOMATION) {
@@ -166,7 +164,6 @@ test('dirty exit commits queues', () => {
166164
test('non-dirty exit does not call commitQueues', () => {
167165
let m = mocks();
168166
m[2].get = function (typ, cb) {
169-
console.log(typ);
170167
if (typ === m[2].QUEUES) {
171168
cb([]);
172169
} else if (typ === m[2].AUTOMATION) {

continuousprint/static/js/continuousprint_viewmodel.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,9 @@ function CPViewModel(parameters) {
315315
break;
316316
case "setstate":
317317
data = JSON.parse(data["state"]);
318-
console.log("got setstate", data);
319318
return self._setState(data);
320319
case "sethistory":
321320
data = JSON.parse(data["history"]);
322-
console.log("got sethistory", data);
323321
return self._setHistory(data);
324322
default:
325323
theme = "info";

continuousprint/storage/queries.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ def _upsertSet(set_id, data, job):
183183
"remaining",
184184
):
185185
v = min(int(v), MAX_COUNT)
186-
print("setattr", k, v)
187186
setattr(s, k, v)
188187
s.job = job
189188

@@ -228,8 +227,6 @@ def updateJob(job_id, data, queue=DEFAULT_QUEUE):
228227
s["rank"] = float(i)
229228
_upsertSet(s["id"], s, j)
230229

231-
print("updateJob() with ", data)
232-
233230
j.save()
234231
return Job.get(id=job_id).as_dict()
235232

@@ -284,9 +281,6 @@ def _moveImpl(src, dest_id, retried=False):
284281
postRank = MAX_RANK
285282
# Pick the target value as the midpoint between the two ranks
286283
candidate = abs(postRank - destRank) / 2 + min(postRank, destRank)
287-
# print(
288-
# f"_moveImpl abs({postRank} - {destRank})/2 + min({postRank}, {destRank}) = {candidate}"
289-
# )
290284

291285
# We may end up with an invalid candidate if we hit a singularity - in this case, rebalance all the
292286
# rows and try again

0 commit comments

Comments
 (0)