After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770889 - Port to GTask & GThreadPool, and fix some associated problems
Port to GTask & GThreadPool, and fix some associated problems
Status: RESOLVED FIXED
Product: gnome-online-miners
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Online Miners maintainer(s)
GNOME Online Miners maintainer(s)
Depends on:
Blocks: 770899
 
 
Reported: 2016-09-05 11:10 UTC by Debarshi Ray
Modified: 2016-09-06 04:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
miner: Simplify code by creating the connection during construction (3.11 KB, patch)
2016-09-05 11:12 UTC, Debarshi Ray
committed Details | Review
miner: Let GomAccountMinerJob own a reference to the connection (1.71 KB, patch)
2016-09-05 11:12 UTC, Debarshi Ray
committed Details | Review
miner: Port gom_miner_refresh_db() to GTask (2.85 KB, patch)
2016-09-05 11:13 UTC, Debarshi Ray
committed Details | Review
miner: Port gom_account_miner_job_process() to GTask (3.78 KB, patch)
2016-09-05 11:13 UTC, Debarshi Ray
committed Details | Review
miner: Replace GIOScheduler with GThreadPool and idle GSource (3.30 KB, patch)
2016-09-05 11:14 UTC, Debarshi Ray
committed Details | Review
miner: Create the GTask before trying to return a GError (1.32 KB, patch)
2016-09-05 11:14 UTC, Debarshi Ray
committed Details | Review
miner: Remove a one-line convenience function (1.51 KB, patch)
2016-09-05 11:15 UTC, Debarshi Ray
committed Details | Review
miner: Pass the GTask around instead of using an instance variable (6.68 KB, patch)
2016-09-05 11:15 UTC, Debarshi Ray
committed Details | Review
miner: Get the cancellable from the GTask, not an instance variable (6.22 KB, patch)
2016-09-05 11:16 UTC, Debarshi Ray
committed Details | Review
src: Drop the GCancellable member from GomAccountMinerJob (58.27 KB, patch)
2016-09-05 11:16 UTC, Debarshi Ray
committed Details | Review
miner: Use a more descriptive name for the GomAccountMinerJob pointers (2.53 KB, patch)
2016-09-05 11:17 UTC, Debarshi Ray
committed Details | Review
miner: Don't use an instance variable for the list of pending jobs (4.21 KB, patch)
2016-09-05 11:18 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2016-09-05 11:10:06 UTC
We should stop using GSimpleAsyncResult and GIOScheduler to stop all the deprecation warnings during the build. Some of the variables that should be tied to each invocation of gom_miner_refresh_db_async are now tied to the entire GomMimer instance. This will cause problems if a second invocation was to happen on the same GomMiner instance.

See the patches.
Comment 1 Debarshi Ray 2016-09-05 11:12:05 UTC
Created attachment 334785 [details] [review]
miner: Simplify code by creating the connection during construction
Comment 2 Debarshi Ray 2016-09-05 11:12:39 UTC
Created attachment 334786 [details] [review]
miner: Let GomAccountMinerJob own a reference to the connection
Comment 3 Debarshi Ray 2016-09-05 11:13:05 UTC
Created attachment 334787 [details] [review]
miner: Port gom_miner_refresh_db() to GTask
Comment 4 Debarshi Ray 2016-09-05 11:13:44 UTC
Created attachment 334788 [details] [review]
miner: Port gom_account_miner_job_process() to GTask
Comment 5 Debarshi Ray 2016-09-05 11:14:12 UTC
Created attachment 334789 [details] [review]
miner: Replace GIOScheduler with GThreadPool and idle GSource
Comment 6 Debarshi Ray 2016-09-05 11:14:46 UTC
Created attachment 334790 [details] [review]
miner: Create the GTask before trying to return a GError
Comment 7 Debarshi Ray 2016-09-05 11:15:19 UTC
Created attachment 334791 [details] [review]
miner: Remove a one-line convenience function
Comment 8 Debarshi Ray 2016-09-05 11:15:52 UTC
Created attachment 334792 [details] [review]
miner: Pass the GTask around instead of using an instance variable
Comment 9 Debarshi Ray 2016-09-05 11:16:22 UTC
Created attachment 334793 [details] [review]
miner: Get the cancellable from the GTask, not an instance variable
Comment 10 Debarshi Ray 2016-09-05 11:16:51 UTC
Created attachment 334794 [details] [review]
src: Drop the GCancellable member from GomAccountMinerJob
Comment 11 Debarshi Ray 2016-09-05 11:17:22 UTC
Created attachment 334795 [details] [review]
miner: Use a more descriptive name for the GomAccountMinerJob pointers
Comment 12 Debarshi Ray 2016-09-05 11:18:04 UTC
Created attachment 334796 [details] [review]
miner: Don't use an instance variable for the list of pending jobs
Comment 13 Debarshi Ray 2016-09-05 18:22:13 UTC
So far, these patches seem to work as intended. I am going to test them a bit more, and unless someone finds something wrong with them, I will merge them tomorrow.
Comment 14 Debarshi Ray 2016-09-06 04:50:06 UTC
Pushed to master! Let me know if something goes wrong.