Problem/Motivation

Getting multiple failed backups for sites that are large enough the backup does not complete before the queue is processed again.

_hosting_backup_queue_get_backup function in hosting_backup_queue.module calls hosting_get_most_recent_task to determine status of most recent backup.

hosting_get_most_recent_task returns FALSE as the db_query fails due to incorrect SQL.

The db_query named placeholder uses ! rather than : turning on SQL command logging yields:

SELECT t.nid FROM hosting_task t INNER JOIN node n ON n.vid = t.vid WHERE task_type = !task_type and t.rid = !t.rid ORDER BY t.vid DESC limit 1

i.e. the placeholder doesn't get swapped out.

Also t.rid fails as a named placeholder.

Proposed resolution

Switch the named placeholders to :task_type and :t_rid

Patch attached.

CommentFileSizeAuthor
hosting_task.module.patch794 bytesnorthstowe

Comments

northstowe created an issue. See original summary.

colan’s picture

Status: Needs review » Reviewed & tested by the community

Seems strange nobody ran into this earlier.

  • helmo committed de0632d on 7.x-3.x authored by northstowe
    Issue #2971336 by northstowe: hosting_get_most_recent_task function has...
helmo’s picture

Status: Reviewed & tested by the community » Fixed

committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.