Use the shrinkdb_status function to determine the status of a shrink operation.
shrinkdb_status(database_name, query)
shrinkdb_status("pubs2", "in_progress")