Commit 3284983ccd78d0f331f840be4ea46c5397c2545c
- Diff rendering mode:
- inline
- side by side
periodic/mail_send.py
(3 / 3)
|   | |||
| 33 | 33 | message = message + cache.get("evec_mail_" + str(mailsend)) | |
| 34 | 34 | except: | |
| 35 | 35 | pass | |
| 36 | if thispass > 50: | ||
| 37 | cont = True | ||
| 38 | break | ||
| 36 | # if thispass > 50: | ||
| 37 | # cont = True | ||
| 38 | # break | ||
| 39 | 39 | ||
| 40 | 40 | smtpsess = smtplib.SMTP('localhost') | |
| 41 | 41 | datae = "To: evec-upload@lists.stackworks.net\nPrecedence: bulk\nX-EVEC-UserIdHash: 0" + "\nSubject: Upload\n\n" + message |
web/datainput.py
(6 / 4)
|   | |||
| 167 | 167 | source = "evec_upload_cache" | |
| 168 | 168 | ||
| 169 | 169 | try: | |
| 170 | source = line[13] | ||
| 170 | source = line[14] | ||
| 171 | 171 | except: | |
| 172 | 172 | pass | |
| 173 | 173 | ||
| 174 | 174 | self.station_check(db, station = station, system = system, region = region) | |
| 175 | 175 | ||
| 176 | |||
| 176 | 177 | cur.execute(""" | |
| 177 | 178 | INSERT INTO current_market (regionid, systemid, stationid, typeid, | |
| 178 | 179 | bid,price, orderid, minvolume, volremain, volenter, issued, duration, range, reportedby) | |
| … | … | ||
| 183 | 183 | """, [region, line[12], line[10], typeid, `bid`, line[0], line[4], line[6], | |
| 184 | 184 | int(float(line[1])), line[5], line[8], line[9]+" days", line[3], 0]) | |
| 185 | 185 | ||
| 186 | db.commit() | ||
| 187 | rows = cur.execute("SELECT orderid FROM archive_market WHERE orderid = %s AND volremain = %s", [ line[4], int(float(line[1]))]) | ||
| 188 | if rows == 0: | ||
| 186 | cur.execute("SELECT count(orderid) FROM archive_market WHERE orderid = %s AND volremain = %s AND regionid = %s", [ line[4], int(float(line[1])), region]) | ||
| 187 | hasdata = cur.fetchone() | ||
| 188 | if not hasdata: | ||
| 189 | response += "This includes new order informaion " | ||
| 189 | 190 | cur.execute(""" | |
| 190 | 191 | INSERT INTO archive_market (regionid, systemid, stationid, typeid, | |
| 191 | 192 | bid,price, orderid, minvolume, volremain, volenter, issued, duration, range, reportedby, source) |

